opt optimize 0 "build with optimizations"
opt nightly 0 "build nightly packages"
opt verify-install 1 "verify installed binaries work"
+opt cross-tests 1 "run cross-compilation tests"
valopt prefix "/usr/local" "set installation prefix"
valopt local-rust-root "" "set prefix for local rust binary"
fn setup() {
}
+fn disabled() -> bool {
+ match os::getenv("CFG_DISABLE_CROSS_TESTS") {
+ Some(ref s) if s.as_slice() == "1" => true,
+ _ => false,
+ }
+}
+
fn alternate() -> &'static str {
match os::consts::SYSNAME {
"linux" => "i686-unknown-linux-gnu",
}
test!(simple_cross {
+ if disabled() { return }
+
let p = project("foo")
.file("Cargo.toml", basic_bin_manifest("foo").as_slice())
.file("src/foo.rs", r#"
})
test!(simple_deps {
+ if disabled() { return }
+
let p = project("foo")
.file("Cargo.toml", r#"
[package]
})
test!(plugin_deps {
+ if disabled() { return }
+
let foo = project("foo")
.file("Cargo.toml", r#"
[package]
})
test!(plugin_to_the_max {
+ if disabled() { return }
+
let foo = project("foo")
.file("Cargo.toml", r#"
[package]
})
test!(linker_and_ar {
+ if disabled() { return }
+
let target = alternate();
let p = project("foo")
.file(".cargo/config", format!(r#"
})
test!(plugin_with_extra_dylib_dep {
+ if disabled() { return }
+
let foo = project("foo")
.file("Cargo.toml", r#"
[package]
})
test!(cross_tests {
+ if disabled() { return }
+
let p = project("foo")
.file("Cargo.toml", r#"
[project]